package com.htgd.gardenexpo.dao;

import com.htgd.gardenexpo.entity.GeBaseDict;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.htgd.gardenexpo.page.DictQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author author
 * @since 2024-04-07
 */
@Mapper
public interface GeBaseDictDao extends BaseMapper<GeBaseDict> {

    List<GeBaseDict> pageList(DictQuery dictQuery);

    @Select("SELECT * FROM `ge_base_dict` WHERE dict_code = #{code}")
    GeBaseDict getByCode(String code);

    String getTextByCodeAndValue(@Param("code") String code, @Param("value") String value);
}
